<{include file="../common/iframe_header.tpl"}>
<form name="form1" method="post" action="/webadmin/network/doExport">
    <br/>
    <div class="left pf40">
        筛选网点：
          <select name="bank_id">
              <option value="0">所有</option>
              <{foreach $banklist as $key => $val}>
                <option value="<{$key}>"><{$val}></option>
              <{/foreach}>
          </select>
          <select name="up_network_id" id="up_network_id"></select>
          <br/>
          <input type="submit"  class="button" value="导出"/>
    </div>
</form>
<script>
$(function(){
    	// 筛选网点
	var html = '<option value="0">所有</option>';
	$('#up_network_id').html(html);
	$('select[name="bank_id"]').change(function(){
		var bank_id = parseInt($(this).val());
		if(bank_id){
			$.ajax({
	 			 type:'get',
	 			 async : true,
				 dataType:"json",
				 data: {'up_network_id':bank_id},
	 			 url:'/webadmin/network/getNet',
	 			 success:function(data){
	 				if(!data.status){
						return false ;
					}else{
						var newHtml = html;
						$.each(data.data, function(i, v){
							newHtml += '<option value="'+i+'">'+v+'</option>';
						});
						$('#up_network_id').html(newHtml);
					}
	 			 }
	 		});
			
		}else{
			$('#up_network_id').html(html);
		}
	});
	
	// 导出
	$('a[name="export"]').click(function(){
		var href = $(this).data('url'),
			bank_id = $('select[name="bank_id"]').val(),
			up_network_id = $('#up_network_id').val(),
			url = href + '?bank_id=' + bank_id + '&up_network_id=' + up_network_id;
		window.location.href = url;
	});
})
</script>
<{include file="../common/footer.tpl"}>